import { eventFormat, stateFormat } from '.'

export function createApp ({template, state, methods}, rootDOM) {
  rootDOM.innerHTML = render(template, state)
}

export function render(template, state ) {

  template = eventFormat(template, state)
  template = stateFormat(template)

  return template
}